package com.bc.commonentity.common;

import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2018/5/15.
 */
public abstract class AbstractRedisService {

    /**
     * redis存储
     *
     * @param key
     * @param value
     * @param timeout 过期时间
     * @param timeUnit 过期时间单位
     */
    public abstract void set(String key, String value, long timeout, TimeUnit timeUnit);


    /**
     *
     * @param key
     * @return
     */
    public abstract String get(String key);

    /**
     *
     * @param keyPattern
     */
    public abstract void remove(String keyPattern);
}
